<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>

        function getArray(arr) {
            for (i=1;i<arr.length;i++){
                if(arr[0]<arr[i]){
                    arr[0]=arr[i]
                }
            }
            return arr[0];
        }
        console.log(getArray([20,46,78,89,91,2,41]));
    </script>
</head>
<body>

</body>
</html>